
package com.wysql.thread.zuse;

import java.util.concurrent.ArrayBlockingQueue;

public class Cooker extends Thread{
    private ArrayBlockingQueue<String> list;

    public Cooker(ArrayBlockingQueue<String> list) {
        this.list = list;
    }

    @Override
    public void run() {
        try {
            while (true){
                list.put("麻辣拌");
                System.err.println("做好了");
            }
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
